<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../../hy/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>库存盘点</title>
<%-- <script type="text/javascript"
	src="${pageContext.request.contextPath }/js/jquery-1.10.2.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/bootstrap/dist/js/bootstrap.js"></script>
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/plugins/layui/css/layui.css"
	media="all" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/bootstrap-datetimepicker.min.css">
<script
	src="${pageContext.request.contextPath }/bootstrap-table/dist/bootstrap-table.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/plugins/layui/layui.js"></script>
<link
	href="${pageContext.request.contextPath }/bootstrap-table/dist/bootstrap-table.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath }/pages/lf/css/bootstrap-editable.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath }/css/bootstrap-datetimepicker.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath }/css/bootstrapValidator.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath }/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath }/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" />
<script src="${pageContext.request.contextPath }/js/toastr.min.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/toastr.min.css">
<script
	src="${pageContext.request.contextPath }/pages/lf/js/bootstrap-editable.js"></script>
<script
	src="${pageContext.request.contextPath }/bootstrap-table/src/locale/bootstrap-table-zh-CN.js"></script>
<script
	src="${pageContext.request.contextPath }/js/bootstrap-datetimepicker.min.js"></script>
<script
	src="${pageContext.request.contextPath }/js/bootstrap-datetimepicker.js"></script>
<script
	src="${pageContext.request.contextPath }/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script
	src="${pageContext.request.contextPath }/js/bootstrapValidator.js"></script>
<script
	src="${pageContext.request.contextPath }/js/bootstrapValidator.min.js"></script>
<script
	src="${pageContext.request.contextPath }/js/alert.js"></script> --%>
<script type="text/javascript">
	$(function() {

		//1.初始化Table
		var oTable = new TableInit();
		oTable.Init();

		//2.初始化Button的点击事件
		var oButtonInit = new ButtonInit();
		oButtonInit.Init();
		
		 toastr.options.positionClass = 'toast-top-center';

		$('#tb_departments').on('click-row.bs.table',function (e, row, element) {
			/* $('#tb_details').bootstrapTable('destroy'); */ 
			//alert(row.pid);
			if(row.ptype == "物料"){
				$('#tb_details').bootstrapTable('hideColumn', 'pdnumb');
			}else{
		  	 	$('#tb_details').bootstrapTable('showColumn', 'pdnumb');
			}
	    	$('#tb_details').bootstrapTable('refresh', {
	    		url: '${pageContext.request.contextPath }/checkstock/selectfycsc.do?pidd='+row.pid,
	    	});
	    });
	});
	var TableInit = function() {
		var oTableInit = new Object();
		//初始化Table
		oTableInit.Init = function() {
			$('#tb_departments').bootstrapTable({
				url : '${pageContext.request.contextPath }/checkstock/selectfycs.do', //请求后台的URL（*）
			 	method: 'GET',                      //请求方式（*）
	            toolbar: '#toolbar',                //工具按钮用哪个容器
	            striped: true,                      //是否显示行间隔色
	            cache: true,                       //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
	            pagination: true,                   //是否显示分页（*）
	            sortable: false,                     //是否启用排序
	            sortOrder: "asc",                   //排序方式
	            queryParams: oTableInit.queryParams,//传递参数（*）
	            sidePagination: "server",           //分页方式：client客户端分页，server服务端分页（*）
	            pageNumber:1,                       //初始化加载第一页，默认第一页
	            pageSize: 10,                       //每页的记录行数（*）
	            pageList: [10,20,30],       //可供选择的每页的行数（*）
	            search: false,                       //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
	            strictSearch: false,
	            showColumns: false,                  //是否显示所有的列
	            showRefresh: false,                  //是否显示刷新按钮
	            minimumCountColumns: 2,             //最少允许的列数
	            clickToSelect: false,                //是否启用点击选中行
	            height: 528,                        //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
	            uniqueId: "ID",                     //每一行的唯一标识，一般为主键列
	            showToggle:false,                    //是否显示详细视图和列表视图的切换按钮
	            cardView: false,                    //是否显示详细视图
	            detailView: false,  
				columns : [ {
					checkbox : true
				}, {
					field : 'pname',
					title : '盘点单号'
				}, {
					field : 'ptype',
					title : '盘点类型'
				}, {
					field : 'pbody',
					title : '盘点人'
				}, {
					field : 'ptime',
					title : '盘点时间',
					sortable : true
				},  {
					field : 'premark',
					title : '备注',
					sortable : true
				}, {
					field : 'pid',
					title : '盘点详情',
					width :100,
					formatter: function (value,row,index) {
						return "<button type='button' class='btn btn-primary' onclick='doDblClickRow(" + row.pid + ",\""+row.ptype+"\")'>查看详情</button>";
				    }
				}],
			});
			$('#tb_details').bootstrapTable({
				method: 'GET',                      //请求方式（*）
	            striped: true,                      //是否显示行间隔色
	            cache: true,                       //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
	            pagination: true,                   //是否显示分页（*）
	            sortable: false,                     //是否启用排序
	            sortOrder: "asc",                   //排序方式
	            queryParams: oTableInit.queryParams,//传递参数（*）
	            sidePagination: "server",           //分页方式：client客户端分页，server服务端分页（*）
	            pageNumber:1,                       //初始化加载第一页，默认第一页
	            pageSize: 10,                       //每页的记录行数（*）
	            pageList: [10,20,30],        //可供选择的每页的行数（*）
	            search: false,                       //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
	            strictSearch: false,
	            showColumns: false,                  //是否显示所有的列
	            showRefresh: false,                  //是否显示刷新按钮
	            minimumCountColumns: 2,             //最少允许的列数
	            clickToSelect: false,                //是否启用点击选中行
	            height: 528,                        //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
	            uniqueId: "ID",                     //每一行的唯一标识，一般为主键列
	            showToggle:false,                    //是否显示详细视图和列表视图的切换按钮
	            cardView: false,                    //是否显示详细视图
	            detailView: false,  
				columns : [ {
					field : 'pdname',
					title : '品名'
				}, {
					field : 'pdnumb',
					title : '品编'
				},  {
					field : 'pnum',
					title : '库存数量',
				},  {
					field : 'pdnum',
					title : '实际数量',
				},  {
					title : '差异数量',
					formatter:function(value,row,index){
		                  return row.pdnum - row.pnum;                      
		     		},
				},  {
					field : 'pdremark',
					title : '备注',
				}],
			});
		};

		//得到查询的参数
		oTableInit.queryParams = function(params) {
			var temp = { //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
				limit : params.limit, //页面大小
				offset : params.offset, //页码
				pname : $.trim($("#pnamee").val()),
				ptype : $.trim($("#ptypee").val()),
				pbody :$.trim($("#pbodyy").val())
			};
			return temp;
		};
		return oTableInit;
	};

	var ButtonInit = function() {
		var oInit = new Object();
		var postdata = {};

		oInit.Init = function() {
			//初始化页面上面的按钮事件
		};

		return oInit;
	};

	//详情
	function doDblClickRow(row,ptype) {
	/*$("#btn_hide").attr("data-toggle", "modal");
		$("#btn_hide").attr("data-target", "#detail");
		$("#btn_hide").click();
		 		$('#detailList').bootstrapTable({
		 checkbox : true,    
		 url: "",
		 });
		 */
	    window.location.href='${pageContext.request.contextPath }/pages/lc/kucungl/pdxiqngqing.jsp?id='+row+"&ptype="+ptype;
	}

	function search() {
		$('#tb_departments').bootstrapTable('refresh');
	}
	
	//添加方法
	function save() {
		
		var pbod = $.trim($("#pbody").val())
		var ptyp = $.trim($("#ptype").val())
		var ptim = $.trim($("#ptime").val())
		
		if(""==pbod || pbod == null){
			toastr.warning("请填写盘点人!");
		}else if("无"==ptyp){
			toastr.warning("请填写盘点类型!");
		}else if(""==ptim || ptime == null){
			toastr.warning("请填写盘点时间!");
		}else{
		
 		$.ajax({ 
		       type: "post",  
		       url: "${pageContext.request.contextPath }/checkstock/addpdd.do",  
		       data: $("#from").serialize(),
		       success:function(data){
		    	   
		    	   var result=eval('('+data+')');
		    	   
				   if(result.success){
		    		   toastr.success("添加成功!");
		    		   $('#myModal').modal('hide');
		    		   $("#from")[0].reset();
		    		   $("#myModal").on("hide.bs.modal", function() {  
		                   $("#myModal").removeData("bs.modal");  
		               });
		    		   
		    		   $('#tb_departments').bootstrapTable('refresh');
		    	   }else{
		    		   toastr.error("添加失败!");
		    	   }
		       } 
			 }); 
		}
	}
	
	//删除方法
	function deletepdd() {
		var row=$.map($("#tb_departments").bootstrapTable('getSelections'),function(row){
			return row ;
		});
		//alert(row.length);
		if (row.length == 0) {
			toastr.warning('请至少选择一条数据!');
		}else{
			var ids="";
			for(var i=0;i<row.length;i++){
				if(i==0 || i=="0"){
					ids+=row[i].pid;
				}else{
					ids+=","+row[i].pid;
				}
			}
					//alert(ids);
			
			//询问框
			Ewin.confirm({ message: "确认要删除选择的数据吗？" }).on(function (e) {
		       if (!e) {
		         return;
		       }else{
		    	   $.ajax({ 
				       type: "post",  
				       url: "${pageContext.request.contextPath}/checkstock/deletepdd.do",  
				       data: "ids="+ids,
				       success:function(data){
				    	   var result=eval('('+data+')');
						   if(result.success){
				    		   toastr.success("删除成功!");
				    		   $('#tb_departments').bootstrapTable('refresh');
				    	   }else{
				    		   toastr.error("删除失败!");
				    	   }
				       } 
					 });
		       } 
			});
		}
	}
	
	function edit() {
		//必须选中一条数据
		var checkedItems = $('#tb_departments').bootstrapTable('getSelections');
		if ((checkedItems.length <= 0) || (checkedItems.length > 1)) {
			layerTips = parent.layer === undefined ? layui.layer : parent.layer
			toastr.warning('请选择一条数据', {
				icon : 3,
				title : '系统提示'
			});
		} else {
			
			var row=$.map($("#tb_departments").bootstrapTable('getSelections'),function(row){
				return row;
			});
			
			$("#btn_edit").attr("data-toggle", "modal");
			$("#btn_edit").attr("data-target", "#divv");
			
			 $.ajax({ 
			       type: "post",  
			       url: "${pageContext.request.contextPath }/checkstock/selectPanid.do",  
			       data: "id="+row[0].pid,
			       success:function(data){
			    	   var list = eval("("+data+")");
						$("#pbodyyy").val(list.pbody);
						$("#premarkkk").val(list.premark);
						$("#ptimeee").val(list.ptime);
						$("#piddd").val(list.pid);
			       } 
				 });

		}
	}
	
	
	//修改方法
	function updatePdd() {
		
		var pbod = $.trim($("#pbodyyy").val())
		var ptim = $.trim($("#ptimeee").val())
		
		if(""==pbod || pbod == null){
			toastr.warning("请填写盘点人!");
		}else if(""==ptim || ptime == null){
			toastr.warning("请填写盘点时间!");
		}else{
			
			//询问框
			Ewin.confirm({ message: "确认要修改选择的数据吗？" }).on(function (e) {
		       if (!e) {
		         return;
		       }else{
		    	   $.ajax({ 
				       type: "post",  
				       url: "${pageContext.request.contextPath }/checkstock/updatepdd.do",  
				       data: $("#upform").serialize(),
				       success:function(data){
				    	   var result=eval('('+data+')');
						   if(result.success){
				    		   toastr.success("修改成功!");
				    		   $('#divv').modal('hide');
				    		   $('#tb_departments').bootstrapTable('refresh');
				    	   }else{
				    		   toastr.error("修改失败!");
				    	   }
				       } 
					 });
		       } 
			})
		}
	}

	function bsby(name) {
		if("提交申请" == $(name).text()){
			layerTips = parent.layer === undefined ? layui.layer : parent.layer
					layerTips.alert('提交成功', {
						icon : 1,
						title : '系统提示'
					});
			$(name).text("无");
		} /*else {
			$("#deupdate").attr("data-toggle", "modal");
			$("#deupdate").attr("data-target", "#deupdate");
			$("#deupdate").click();
			
		} */
	}
	
</script>
</head>
<body>
	<div class="panel-body" style="padding-bottom: 0px;">
		<div class="panel panel-default">
			<div class="panel-heading">查询条件</div>
			<div class="panel-body">
				<form id="formSearch" class="form-horizontal">
					<div class="form-group" style="margin-top: 15px">
						<label class="control-label col-sm-1"
							for="txt_search_departmentname">盘点单号</label>
						<div class="col-sm-2">
							<input type="text" class="form-control"
								id="pnamee">
						</div>
						<label class="control-label col-sm-1"
							for="txt_search_departmentname">盘点类型</label>
						<div class="col-sm-2">
							<input type="text" class="form-control"
								id="ptypee">
						</div>
						<label class="control-label col-sm-1" for="txt_search_statu">盘点人</label>
						<div class="col-sm-2">
							<input type="text" class="form-control" id="pbodyy">
						</div>
						<div class="col-sm-3" style="text-align: left;">
						<button type="button" style="margin-left:50px" id="btn_query" 
                            	class="btn btn-primary" onclick="search()">查询</button>
						</div>
					</div>
				</form>
			</div>
		</div>

		<div id="toolbar" class="btn-group">
			<button id="btn_add" type="button" class="btn btn-default"
				data-toggle="modal" data-target="#myModal">
				<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
			</button>
			<button id="btn_edit" type="button" class="btn btn-default"
				onclick="edit()">
				<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
			</button>
			<button id="btn_delete" type="button" class="btn btn-default"
				onclick="deletepdd()">
				<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
			</button>
		</div>
		<table id="tb_departments"></table>
		<table id="tb_details"></table>
		<!-- 新增 -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true"
			data-backdrop="static" data-keyboard="false">
			<div class="modal-dialog" style="height: auto;">
				<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title" id="myModalLabel">新增</h4>
					</div>
					<div class="modal-body">
						<form class="form-horizontal" role="form" id = "from">
							<div class="form-group">
								<label for="user_id" class="col-sm-2 control-label">盘点人</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="pbody"
										name="pbody" >
								</div>
							</div>
							<div class="form-group">
								<label for="user_id" class="col-sm-2 control-label" >盘点类型</label>
								<div class="col-sm-9">
									<select class="form-control" id="ptype" name="ptype" >
										<option value="无">-- 请选择类型 --</option>
										<option value="产品">产品</option>
										<option value="物料">物料</option>
									</select>
								</div>
							</div>
							
							<div class="form-group">
								<label class="col-sm-2 control-label">盘点日期</label>
								<div class="col-sm-9">
									 <input class="form_datetime form-control" type="text" id="ptime" name="ptime" readonly required>
								</div>
							</div>
							
							<div class="form-group">
								<label for="remark" class="col-sm-2 control-label">备注</label>
								<div class="col-sm-9">
									<textarea class="form-control" name="premark" id="premark"></textarea>
								</div>
							</div>
						</form>
					</div>
					<div class=""></div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" class="btn btn-primary" onclick="save()">保存</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
		<!-- 修改 -->
		<div class="modal fade" id="divv" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true"
			data-backdrop="static" data-keyboard="false">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">修改</h4>
					</div>
					<div class="modal-body">
						<form class="form-horizontal" role="form" id = "upform" >
							<div class="form-group">
								<label for="user_id" class="col-sm-3 control-label">盘点人</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="pbodyyy" name="pbody">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">盘点日期</label>
								<div class="col-sm-9">
									 <input class="form_datetime form-control" type="text" id="ptimeee" name="ptime" readonly required>
								</div>
							</div>
							<div class="form-group">
								<label for="remark" class="col-sm-3 control-label">备注</label>
								<div class="col-sm-9">
									<textarea class="form-control" name="premark" id="premarkkk">
                                </textarea>
                                <input  type="hidden" class="form-control" id="piddd" name="pid">
								</div>
							</div>							
						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" class="btn btn-primary" onclick="updatePdd()">保存</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>

		<div class="modal fade" id="detail" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true"
			data-backdrop="static" data-keyboard="false">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">盘点详情</h4>
					</div>
					<!-- <div id="toolbar" class="btn-group">
						<button id="btn_edit" type="button" class="btn btn-default"
							onclick="edit()">
							<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
						</button>
					</div> -->
					<div class="modal-body">
						<form>
							<table id="detailList" class="table">
								<thead>
									<tr>
										<th data-options="field:'modelname',width:100,align:'center'">品名</th>
										<th data-options="field:'modelid',width:250,align:'center'">品编</th>
										<th data-options="field:'color',width:80,align:'center'">颜色</th>
										<th data-options="field:'invenid',width:80,align:'center'">批号</th>
										<th data-options="field:'startPlace',width:80,align:'center'">库区</th>
										<th data-options="field:'unit',width:80,align:'center'">包装单位</th>
										<th data-options="field:'virPlace',width:80,align:'center'">库存数量</th>
										<th data-options="field:'realPlace',width:80,align:'center'">盘点数量</th>
										<th data-options="field:'reason',width:80,align:'center'">是否有差异</th>
										<th data-options="field:'remark',width:80,align:'center'">执行</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>Bangalore</td>
										<td>1</td>
										<td>灰</td>
										<td>20171114</td>
										<td>A</td>
										<td>箱</td>
										<td>100</td>
										<td>99</td>
										<td>有</td>
										<td><a onclick="bsby(this);">提交申请</a></td>
									</tr>
									<tr>
										<td>Mumbai</td>
										<td>2</td>
										<td>灰</td>
										<td>20171114</td>
										<td>A</td>
										<td>个</td>
										<td>10</td>
										<td>10</td>
										<td>无</td>
										<td>无</td>
									</tr>
								</tbody>
							</table>
						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<!-- <button id="bsby" type="button" class="btn btn-primary"
							onclick="bsby()">提交报损报溢申请</button> -->
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
		<div class="modal fade" id="deupdate" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true"
			data-backdrop="static" data-keyboard="false">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">差异修改</h4>
					</div>
					<div class="modal-body">
						<form class="form-horizontal" role="form">
							<div class="form-group">
								<label for="user_id" class="col-sm-3 control-label">产品编号</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="deid" name="deid" value="1" readonly>
								</div>
							</div>
							<div class="form-group">
								<label for="user_id" class="col-sm-3 control-label">产品名称</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="dename" name="dename" value="Bangalore" readonly>
								</div>
							</div>
							<div class="form-group">
								<label for="user_id" class="col-sm-3 control-label">位置</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="deplace" name="deplace"  value="A-1-1" readonly>
								</div>
							</div>
							<div class="form-group">
								<label for="user_id" class="col-sm-3 control-label">库存数量</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="devirPlace" name="devirPlace" value="100" readonly>
								</div>
							</div>
							<div class="form-group">
								<label for="user_id" class="col-sm-3 control-label">盘点数量</label>
								<div class="col-sm-9">
									<input type="text" class="form-control" id="derealPlace" value="99" name="derealPlace">
								</div>
							</div>

							<div class="form-group">
								<label for="remark" class="col-sm-3 control-label">备注</label>
								<div class="col-sm-9">
									<textarea class="form-control" name="remark1" id="remark1" value="有"
										placeholder="备注">

                                </textarea>
								</div>
							</div>
						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="deupdate">关闭</button>
						<button id="deupdate" type="button" class="btn btn-primary">提交更改</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
	</div>
</body>
<!-- 时间控件 -->
<script type="text/javascript">
	    $(".form_datetime").datetimepicker({
			/* 显示格式 */       
	    	format: "yyyy-mm-dd",
	/*     	format: "yyyy-mm-dd hh:ii:ss", */
	        /* 完成关闭 */
	        autoclose: true,
	       /*  今天 时间按钮*/
	        todayBtn: true,
	       /*  今天的时间变黄色 */
	        todayHighlight:true, 
	        /* 定位 */
	        pickerPosition: "bottom-left",
	        /* 最小值 */
	        /* startDate: "2013-02-14 10:00", */
	        minuteStep: 10,
	        /*  语言 */
	        language: 'zh-CN',  
			/* 分上午下午 */
	        showMeridian: true,
	        /* 分的所有 */
	        minuteStep:true,
	        clearBtn:true,// 自定义属性,true 显示 清空按钮 false 隐藏 默认:true
	        startView: 2,//月视图
			minView: 2//日期时间选择器所能够提供的最精确的时间选择视图
	    });
</script>
</html>